package com.icodingedu.springcloud.service;

import com.icodingedu.springcloud.topic.GroupConsumer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;

@Slf4j
@EnableBinding(value = {
        GroupConsumer.class
})
public class StreamConsumer {

    @StreamListener(GroupConsumer.INPUT)
    public void consumerGroupMessage(Object payload){
        log.info("Group message consumed successfully,payload={}",payload);
    }
}
